// 机工具信息

import request from "@/api/request";
// 分页查询机工具
export const query_equip = (params) => {
  return request({
    url: "/essentialdata/pe/selectAll",
    method: "post",
    data: params,
  });
};

// 新增机工具
export const add_equip = (params) => {
  return request({
    url: "/essentialdata/pe/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 分页查询机工具分类树
export const select_equip = (params) => {
  return request({
    url: "/essentialdata/pe/selectEcTree/"+params,
    method: "post"
  });
};

// 逻辑删除机工具
export const delete_equip = (params) => {
  return request({
    url: `/essentialdata/pe/delete/${params}`,
    method: "post",
    data: params,
  });
};

// 修改机工具
export const update_equip = (params) => {
  return request({
    url: "/essentialdata/pe/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 查询机工具详情
export const select_equipDetails = (params) => {
  return request({
    url: `/essentialdata/pe/selectDetails/${params}`,
    method: "post",
    data: params,
  });
};

// 选择机工具型号
export const select_equipModel = (params) => {
  return request({
    url: "/essentialdata/pe/setModel",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};


// 生产商
export const select_Manufacturer = (params) => {
  return request({
    url: "/essentialdata/ed/producerList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 型号
export const select_Model = (params) => {
  return request({
    url: "/essentialdata/ed/modelList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 计量单位
export const select_UnitList = (params) => {
  return request({
    url: "/essentialdata/ed/unitList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};
